-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Quiz exercises
: Fix an issue with drag and drop positioning
#8265
Conversation
WalkthroughThe recent update involves refining the Changes
Possibly related issues
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
...pp/app/exercises/quiz/manage/apollon-diagrams/exercise-generation/quiz-exercise-generator.ts
Outdated
Show resolved
Hide resolved
|
Quiz Exercises
: Rectify drag-and-drop positioningQuiz exercises
: Fix an issue with drag and drop positioning
This PR hotfixes the positioning of elements when dragging and dropping elements in Quiz exercises.
Checklist
General
Client
Motivation and Context
At the moment, elements dragged for quiz exercises and positioned incorrectly. This PR fixes this behavior.
Description
The
computeDropLocation
function inquiz-exercise-generator.ts
wrongly assumes all SVGs start from {x: 0, y: 0}, which is not the case. it calculates drop location positions as a percentage of the total width, but because of not offsetting the starting position of the SVG clip. This PR fixes this issue by offsetting the calculation by thetotalSize's
x and y coordinates.Steps for Testing
Prerequisites:
Exam Mode Testing
Prerequisites:
Testserver States
Note
These badges show the state of the test servers.
Green = Currently available, Red = Currently locked
Review Progress
Performance Review
Code Review
Manual Tests
Exam Mode Test
Test Coverage
Screenshots
Summary by CodeRabbit
Summary by CodeRabbit